﻿using System.ServiceProcess;
using Kurax.BoardGames.Server;

namespace GameServerService {
    public partial class GameService : ServiceBase {
        private Server server;

        public GameService() {
            this.InitializeComponent();
        }

        protected override void OnStart(string[] args) {
            this.server = new Server();
            this.server.Start();
        }

        protected override void OnStop() {
            if(this.server != null && this.server.IsRunning)
                this.server.Stop();
        }
    }
}
